package com.meizhao.admin.configuration;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 系统配置properties
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Component
@ConfigurationProperties(prefix = "system.config")
public class ConfigProperties {

    private String loginEncodeRules;

    private Integer sessionTimeoutMinus;

    private List<String> passUrls;

    private List<String> adminUrlPrefixs;

    private List<String> apiUrlPrefixs;

    private String adminNoLoginUrl;

    private String errorUrl;

    private List<String> resourceUrls;

    private String dbBackupWinPath;

    private String dbBackupLinuxPath;

    private String dbBackupRate;

    private Integer remainBackDbSize;

    @Value("${spring.datasource.username}")
    private String username;

    @Value("${spring.datasource.password}")
    private String password;

    @Value("${spring.datasource.url}")
    private String url;

    private String host;

    private String port;

    private String db;

    private Long fileSizeLimit;

    private List<String> fileTypeLimits;

    private String fileWinPath;

    private String fileWinAvatarPath;

    private String fileLinuxPath;

    private String fileLinuxAvatarPath;

    private String filePattern;

    private String avatarPattern;

    private String msgcodeEnabletime;

    private String msgcodeEnableRules;

    private Boolean mockSendMsg;

    private Boolean mockCharge;

    private String defaultPwd;

    private Integer maxGetMsgCodeOneDay;

}
